import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'

Vue.config.productionTip = false

// 导入全局css样式
import '@/styles/index.scss'

// // 导入vant
import Vant, {
  Lazyload,
  Area,
  AddressList,
  Skeleton,
  ImagePreview
} from 'vant'
import 'vant/lib/index.css'
Vue.use(Vant)
Vue.use(Lazyload)
Vue.use(Area)
Vue.use(AddressList);
Vue.use(Skeleton);
Vue.use(ImagePreview);

// 设置全局事件总线
const bus = new Vue()
Vue.prototype.$bus = bus

// 导入全局混入对象
import '@/utils/mixin'

// 导入全局组件
import '@/components/route' 

//封装axios
import {axios} from './api/request'
Vue.prototype.$axios = axios 

//封装ajax
import {ajax} from './api/index'
Vue.prototype.$ajax = ajax 

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
